package com.cwj.springboot_study.controller;

import com.linecorp.armeria.server.annotation.Get;
import net.bytebuddy.asm.Advice;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * @author: Chenwujie
 * @date: 2021-05-25 11:04
 */
@CrossOrigin("*")
@RestController
public class HelloController {

    @GetMapping("/hello/heel")
    public String hello(int n) throws InterruptedException {
//        TimeUnit.SECONDS.sleep(3);
        return "hello world!" + n;
    }

    @PostMapping("/datetime")
    public String test(@RequestBody Query query){
        return "success";
    }

    @PostMapping("/datetime2")
    public String test2(Query query){
        return "success";
    }

    @GetMapping("/datetime")
    public Query test3(Query query){
        return query;
    }



}
